﻿using SIG.Resources.Front;
using System.ComponentModel.DataAnnotations;

namespace SIG.InputModel.Front.SetupWizard
{
    public class SetupIM
    {
        [Display(ResourceType = typeof(Labels), Name = "SiteName")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public string SiteName { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "DatabaseServer")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]

       
        public string DatabaseServer { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "DatabaseName")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public string DatabaseName { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "UserName")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public string DatabaseUser { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "Password")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public string DatabasePassword { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "IsWithData")]      
        public bool IsWithData { get; set; }

    


    }

    public class SetupAdminIM: SetupIM
    {
        
        [Display(ResourceType = typeof(Labels), Name = "UserName")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public string AdminUser { get; set; }
        [Display(ResourceType = typeof(Labels), Name = "Password")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        public string AdminPassword { get; set; }
        [DataType(DataType.Password)]
        [Display(ResourceType = typeof(Labels), Name = "ConfirmPassword")]
        [Compare("AdminPassword", ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "ComparePassword")]
        public string ConfirmPassword { get; set; }

        [Display(ResourceType = typeof(Labels), Name = "Email")]
        [Required(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "Required")]
        [EmailAddress(ErrorMessageResourceType = typeof(Validations), ErrorMessageResourceName = "EmailAddressInvalidFormat")]
        public string AdminEmail { get; set; }


    }
}
